package com.imooc.sell.exception;


import com.imooc.sell.enums.ResultEnum;

/**
 * The type Sell exception.
 *
 * @author YangYishe
 * @date 2021年09月07日 09:27
 */
public class SellException extends RuntimeException{
    private Integer code;

    public SellException() {
    }

    public SellException(Integer code,String message){
        super(message);
        this.code=code;
    }

    public SellException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code=resultEnum.getCode();
    }
}
